package com.ruoyi.shop.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * cart对象 cart
 *
 * @author ruoyi
 * @date 2025-06-12
 */
public class Cart extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 购物车ID */
    private Long cartid;

    /** 商品ID */
    @Excel(name = "商品ID")
    private Long goodsid;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userid;

    /** 数量 */
    @Excel(name = "数量")
    private Long quantity;

    /** 价格 */
    @Excel(name = "价格")
    private BigDecimal price;

    /** 是否结算 */
    @Excel(name = "是否结算")
    private Long issubmit;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createDate;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updateDate;
    private Goods goods;

    public Goods getGoods() {
        return goods;
    }

    public void setGoods(Goods goods) {
        this.goods = goods;
    }

    public void setCartid(Long cartid)
    {
        this.cartid = cartid;
    }

    public Long getCartid()
    {
        return cartid;
    }
    public void setGoodsid(Long goodsid)
    {
        this.goodsid = goodsid;
    }

    public Long getGoodsid()
    {
        return goodsid;
    }
    public void setUserid(Long userid)
    {
        this.userid = userid;
    }

    public Long getUserid()
    {
        return userid;
    }
    public void setQuantity(Long quantity)
    {
        this.quantity = quantity;
    }

    public Long getQuantity()
    {
        return quantity;
    }
    public void setPrice(BigDecimal price)
    {
        this.price = price;
    }

    public BigDecimal getPrice()
    {
        return price;
    }
    public void setIssubmit(Long issubmit)
    {
        this.issubmit = issubmit;
    }

    public Long getIssubmit()
    {
        return issubmit;
    }
    public void setCreateDate(Date createDate)
    {
        this.createDate = createDate;
    }

    public Date getCreateDate()
    {
        return createDate;
    }
    public void setUpdateDate(Date updateDate)
    {
        this.updateDate = updateDate;
    }

    public Date getUpdateDate()
    {
        return updateDate;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("cartid", getCartid())
            .append("goodsid", getGoodsid())
            .append("userid", getUserid())
            .append("quantity", getQuantity())
            .append("price", getPrice())
            .append("issubmit", getIssubmit())
            .append("createDate", getCreateDate())
            .append("updateDate", getUpdateDate())
            .toString();
    }
}
